// 是否枚举
enum YesOrNoEnum {
  no = 0,
  yes = 1,
}

// 是否枚举成员
const yesOrNoMembers: Map<YesOrNoEnum, string> = new Map<YesOrNoEnum, string>()
yesOrNoMembers.set(YesOrNoEnum.no, '否')
yesOrNoMembers.set(YesOrNoEnum.yes, '是')

/**
 * 是否过滤器
 * @param value 值
 * */
function yesOrNoFilter(value: YesOrNoEnum): string {
  const result: string = yesOrNoMembers.has(value) ? yesOrNoMembers.get(value)! : ''
  return result
}

export { YesOrNoEnum, yesOrNoMembers, yesOrNoFilter }
